<?php
if (!defined('IN_WONDERSHARE'))
{
	die('Hacking attempt');
}
class ProductsPageModule 
{
   var $db;
 
   function __construct()
   {
   	$this->db = $GLOBALS['db'];
   }
   function get_products_page_info($sql,$type)
   { 
   	$date = $row = array();
	$result = $this->db->query($sql);
	if($type == 'list')
	{
		while($row = $this->db->fetch_array($result))
		{
		   $row['page_update_time'] = date('Y-m-d H:i',$row['page_update_time']);
		   $date[] = $row;
		}
	}else
	{
		while($row = $this->db->fetch_array($result))
		{
		   $date[] = $row;
		}
	}
	unset($row);	
	return  $date;
   }
   function  change_info($sql)
   {
   	$affect = $this->db->query($sql);
   	return  $affect;
   }
}

?>